package com.huitong.common.mybatis.config;

import com.huitong.common.mybatis.interceptor.AutoFillInterceptor;
import org.apache.ibatis.plugin.Interceptor;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Bean;

/**
 * Mybatis配置
 *
 * @author fromdrowning
 * @date 2024/3/26 22:24
 */
@AutoConfiguration
public class MybatisConfiguration {

    /**
     * 自动填充公共字段拦截器配置
     *
     * @return 自动填充公共字段拦截器
     */
    @Bean
    public Interceptor autoFillInterceptorCustomizer() {
        return new AutoFillInterceptor();
    }
}
